<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="p" %>
<%String ctx = request.getContextPath(); %>

<jsp:include page="../common/operate.jsp">
	<jsp:param name="title1" value="订单列表"/>
	<jsp:param name="title2" value=""/>
	<jsp:param name="isShowAddBtn" value="true"/>
	<jsp:param name="isShowUpdateBtn" value="true"/>
	<jsp:param name="isShowDeleteBtn" value="true"/>
</jsp:include>

    <div style="width:100%" class="f_l margin1">
    <s:form id="listForm" method="POST" theme="simple">
    <table width="98%" cellspacing="0" cellpadding="0" border="0" class="clear f_l padding3" id="tb">
      <tr class="bg4_nav">
      	<td width="6%" style="border:0">
			<input onclick="javascript:batchSelect(this)" type="checkbox" style="border:0" name="List_Selected2">
		</td>
        <td class="t_c" style="border:0">
			下单时间
        </td>
        <td class="t_c" style="border:0">
			姓名
        </td>
        <td class="t_c" style="border:0">
			手机
        </td>
        <td class="t_c" style="border:0">
			地址
        </td>
        <td class="t_c" style="border:0">
			内容
        </td>
        <td class="t_c" style="border:0">
			状态
        </td>
      </tr>
    <s:iterator value="pager.result" status="status">
      <tr align="center" onmouseover="this.bgColor='#F2E6E6'" onmouseout="this.bgColor=''">
      	<td class="border_tb">
       		<input type="checkbox" style="border:0" name="ids" value="${id }">
        </td>
        <td class="border_tb" style="cursor: pointer;" onclick="window.location.href='history!list.action?callId=${id}'">
          &nbsp;<s:date name="createdDate" format="yyyy-MM-dd HH:mm:ss"/>
        </td>
        <td class="border_tb" style="cursor: pointer;" onclick="window.location.href='history!list.action?callId=${id}'">
          &nbsp;<s:property value="name"/>
        </td>
        <td class="border_tb" style="cursor: pointer;" onclick="window.location.href='history!list.action?callId=${id}'">
          &nbsp;<s:property value="mobile"/>
        </td>
        <td class="border_tb" style="cursor: pointer;" onclick="window.location.href='history!list.action?callId=${id}'">
          &nbsp;<s:property value="address"/>
        </td>
        <td class="border_tb" style="cursor: pointer;" onclick="window.location.href='history!list.action?callId=${id}'">
          &nbsp;<s:property value="content"/>
        </td>
        <td class="border_tb">
          &nbsp;<s:if test="%{status == 1}">新预订</s:if>
          <s:if test="%{status == 2}">派送中</s:if>
          <s:if test="%{status == 3}">已成交</s:if>
          <s:if test="%{status == 4}">已取消</s:if>
        </td>
      </tr>
     </s:iterator>
     </table> 
     </s:form>
    </div>
    <div class="f_l margin1" style="width:100%">
      <p:page pager="${pager}" url="call!list.action" namespace="/call"/>
    </div> 
    
<script type="text/javascript">
$(window).ready(function(){
	addOperate('addButton','<%=ctx%>/call/call!add');
	updateOperate('updateButton','<%=ctx%>/call/call!edit');
	batchDelete('deleteButton','listForm','<%=ctx%>/call/call!deleteAll');
	isAllSelected('listForm');	
});
</script>
